In an embedded system, a central processing unit (CPU) and a double data rate synchronous dynamic random access memory (DDR SDRAM or DDR) need to be initialized using a board (especially, a boot formed on the board), and an operating system such as Linux can be started only after the CPU and the DDR are initialized.
Currently, a universal procedure for starting a chip including a CPU includes that, after being powered on, a CPU reads an instruction from a start location in a specified storage medium, to initialize hardware such as the CPU and a DDR; and then the CPU copies code in boot and an operating system (OS) to a specified location in the DDR and runs the code. In the foregoing solution, initialization configurations of the hardware such as the CPU and the DDR are all saved in boot code, and cannot be modified after compilation unless recompiled.
When software is developed for a series of chips, due to differences in design of different chips, boot code needs to be compiled for each type of chip, and even for two slightly different types of chips of a same company, different branches need to be designed in code. As the number of newly developed chips is increasing, maintenance costs are increasing, and an error probability is also increasing.